﻿<UserControl
    x:Class="RegOnline.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">

    <Grid x:Name="LayoutRoot" Style="{StaticResource LayoutRootGridStyle}">

        <Border x:Name="ContentBorder" Style="{StaticResource ContentBorderStyle}">

            <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}"
                              Source="/login" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
                <navigation:Frame.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF7E80FF"/>
                        <GradientStop Color="White" Offset="0.108"/>
                    </LinearGradientBrush>
                </navigation:Frame.Background>
                <navigation:Frame.UriMapper>
                    <uriMapper:UriMapper>
                        <uriMapper:UriMapping Uri="" MappedUri="/Views/lodin.xaml"/>
                        <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
                    </uriMapper:UriMapper>
                </navigation:Frame.UriMapper>
            </navigation:Frame>
        </Border>

        <Grid x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}">
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF09016E" Offset="0"/>
                    <GradientStop Color="#FF5345FF" Offset="1"/>
                </LinearGradientBrush>
            </Grid.Background>

            <Border x:Name="BrandingBorder" Style="{StaticResource BrandingBorderStyle}">
                <StackPanel x:Name="BrandingStackPanel" Style="{StaticResource BrandingStackPanelStyle}">

                    <ContentControl Style="{StaticResource LogoIcon}"/>
                    <TextBlock x:Name="ApplicationNameTextBlock" Style="{StaticResource ApplicationNameStyle}"
                               Text="Система онлайн регистрации работ"/>
                </StackPanel>
            </Border>

            <Border x:Name="LinksBorder" Style="{StaticResource LinksBorderStyle}">
                <StackPanel x:Name="LinksStackPanel" Style="{StaticResource LinksStackPanelStyle}" Visibility="Collapsed">

                    <HyperlinkButton x:Name="Link3" Style="{StaticResource LinkStyle}" TargetName="ContentFrame" Content="StudPage" NavigateUri="/StudPage" Visibility="Collapsed" />

                    <HyperlinkButton x:Name="Link5" Style="{StaticResource LinkStyle}" TargetName="ContentFrame" Content="UchebnPlanPage" NavigateUri="/UchebnPlanPage" Visibility="Collapsed" />

                    <HyperlinkButton x:Name="Link4" Style="{StaticResource LinkStyle}" TargetName="ContentFrame" Content="PrepodavatelPage" NavigateUri="/PrepodavatelPage" Visibility="Collapsed" />

                    <HyperlinkButton x:Name="Link1" Style="{StaticResource LinkStyle}"
                                     NavigateUri="/home" TargetName="ContentFrame" Content="home"/>

                    <Rectangle x:Name="Divider1" Style="{StaticResource DividerStyle}"/>

                    <HyperlinkButton x:Name="Link2" Style="{StaticResource LinkStyle}"
                                     NavigateUri="/About" TargetName="ContentFrame" Content="about"/>
                </StackPanel>
            </Border>
            <Border x:Name="userNameBorder" Style="{StaticResource LinksBorderStyle}">
                <StackPanel VerticalAlignment="Center" >
                    <TextBlock x:Name="TextBlockUserName" Text="Not Autorized" Style="{StaticResource UserNameHintStyle}" />
                </StackPanel>
            </Border>

        </Grid>

    </Grid>

</UserControl>